# Created by: David Romano <unobe@cpan.org>
# $FreeBSD: branches/2014Q3/devel/libparserutils/Makefile 327724 2013-09-20 17:13:42Z bapt $

PORTNAME=	libparserutils
PORTVERSION=	0.2.0
CATEGORIES=	devel
MASTER_SITES=	http://download.netsurf-browser.org/libs/releases/
DISTNAME=	${PORTNAME}-${PORTVERSION}-src

MAINTAINER=	olivierd@FreeBSD.org
COMMENT=	Library for building efficient parsers

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/COPYING

MAKEFILETOP=	${LOCALBASE}/share/netsurf-buildsystem/makefiles/Makefile.top

BUILD_DEPENDS=	${MAKEFILETOP}:${PORTSDIR}/devel/netsurf-buildsystem

USES=		gmake perl5
USE_PERL5=	build
USE_CSTD=	gnu99
USE_LDCONFIG=	yes

CFLAGS+=	-DWITH_ICONV_FILTER \
	-I${LOCALBASE}/include
LDFLAGS+=	${ICONV_LIB} \
	-L${LOCALBASE}/lib
MAKE_ENV+=	COMPONENT_TYPE=lib-shared

WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}

post-patch:
	${REINPLACE_CMD} -i '' -e 's|LIBDIR|lib|' \
		${WRKSRC}/libparserutils.pc.in 

.include <bsd.port.mk>
